package com.itheima.entity;

/**
 * 返回结果实体类
 */
public class Result<T> {
    private String code;//返回码
    private T data;//返回数据

    public Result(String code, Object data) {
        this.code = code;
        this.data = (T)data;
    }

    public Result(String code) {
        this.code = code;
    }

    public Result() {
        this.code = "success";
    }

    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
